<?php /* Smarty version 2.6.26, created on 2012-05-12 14:46:00
         compiled from controllers%5Cplugins.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'cat', 'controllers\\plugins.tpl', 4, false),array('modifier', 'replace', 'controllers\\plugins.tpl', 8, false),array('function', 'rlHook', 'controllers\\plugins.tpl', 131, false),)), $this); ?>
<!-- plugins tpl -->

<div id="update_area" class="hide">
	<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'm_block_start.tpl') : smarty_modifier_cat($_tmp, 'm_block_start.tpl')), 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
	<div id="update_info">
		<?php $this->assign('replace_ver', ('{')."version".('}')); ?>
		<?php $this->assign('replace_name', ('{')."name".('}')); ?>
		<div><?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lang']['plugin_update_request_hint'])) ? $this->_run_mod_handler('replace', true, $_tmp, $this->_tpl_vars['replace_ver'], '<b><span id="update_version"></span></b>') : smarty_modifier_replace($_tmp, $this->_tpl_vars['replace_ver'], '<b><span id="update_version"></span></b>')))) ? $this->_run_mod_handler('replace', true, $_tmp, $this->_tpl_vars['replace_name'], '<span id="update_link"></span>') : smarty_modifier_replace($_tmp, $this->_tpl_vars['replace_name'], '<span id="update_link"></span>')); ?>
</div>
		<input id="start_update" type="button" value="<?php echo $this->_tpl_vars['lang']['update']; ?>
" />
		<a onclick="$('#update_area').slideUp();" class="cancel" href="javascript:void(0);"><?php echo $this->_tpl_vars['lang']['cancel']; ?>
</a>
	</div>
	<div id="update_progress" class="hide">
		<div class="dark_12"><b id="plugin_name"></b> <?php echo $this->_tpl_vars['lang']['plugin_is_updating']; ?>
</div>
		<div class="progress static" style="padding: 5px 0 0;"><?php echo $this->_tpl_vars['lang']['remote_progress_backingup']; ?>
</div>
	</div>
	<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'm_block_end.tpl') : smarty_modifier_cat($_tmp, 'm_block_end.tpl')), 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
</div>

<script type="text/javascript">//<![CDATA[
var plugin_updating_phrase = "<?php echo $this->_tpl_vars['lang']['remote_progress_updating']; ?>
";
var plugin_update_notice = "<?php echo $this->_tpl_vars['lang']['remote_plugin_update_notice']; ?>
";
var update_plugin_key;
<?php echo '

$(document).ready(function(){
	$(\'#start_update\').click(function(){
		rlConfirm(plugin_update_notice, \'startUpdate\');
	});
});

var startUpdate = function(){
	$(\'#update_info\').fadeOut(function(){
		$(\'#update_progress\').fadeIn();
		xajax_remoteUpdate(update_plugin_key, true);
	});
};

var continueUpdating = function(key){
	$(\'div#progress div.progress\').html(plugin_updating_phrase);
	
	xajax_update(key);
};

var hideProgressBar = function(){
	$(\'#update_progress\').fadeOut();
};

'; ?>

//]]>
</script>

<!-- plugins grid -->
<div id="grid"></div>
<script type="text/javascript">//<![CDATA[
var listingPlansGrid;

<?php echo '
$(document).ready(function(){
	
	pluginsGrid = new gridObj({
		key: \'plugins\',
		id: \'grid\',
		ajaxUrl: rlUrlHome + \'controllers/plugins.inc.php?q=ext\',
		defaultSortField: \'Name\',
		title: lang[\'ext_plugins_manager\'],
		fields: [
			{name: \'ID\', mapping: \'ID\'},
			{name: \'Name\', mapping: \'Name\', type: \'string\'},
			{name: \'Key\', mapping: \'Key\'},
			{name: \'Description\', mapping: \'Description\', type: \'string\'},
			{name: \'Version\', mapping: \'Version\'},
			{name: \'Status\', mapping: \'Status\'}
		],
		columns: [
			{
				header: lang[\'ext_name\'],
				dataIndex: \'Name\',
				width: 30,
				id: \'rlExt_item_bold\'
			},{
				header: lang[\'ext_description\'],
				dataIndex: \'Description\',
				width: 60
			},{
				header: lang[\'ext_version\'],
				dataIndex: \'Version\',
				width: 12
			},{
				header: lang[\'ext_status\'],
				dataIndex: \'Status\',
				width: 12,
				editor: new Ext.form.ComboBox({
					store: [
						[\'active\', lang[\'ext_active\']],
						[\'approval\', lang[\'ext_approval\']]
					],
					displayField: \'value\',
					valueField: \'key\',
					typeAhead: true,
					mode: \'local\',
					triggerAction: \'all\',
					selectOnFocus:true
				})
			},{
				header: lang[\'ext_actions\'],
				width: 70,
				fixed: true,
				dataIndex: \'Key\',
				sortable: false,
				renderer: function(value) {
					var complete = value.split(\'|\');
					var out = "<center>";

					if (complete[1] == \'not_installed\')
					{
						out += "<img class=\'install\' title=\'"+lang[\'ext_install\']+"\' src=\'"+rlUrlHome+"img/blank.gif\' onclick=\'xajax_install(\\""+complete[0]+"\\");$(this).animate({opacity: 0.5}, \\"slow\\").attr(\\"onclick\\", \\"\\");\' />";
					}
					else
					{
						out += "<img class=\'update\' title=\'"+lang[\'ext_check_for_update\']+"\' src=\'"+rlUrlHome+"img/blank.gif\' onclick=\'xajax_checkForUpdate(\\""+complete[0]+"\\");\' />";
						out += "<img class=\'uninstall\' title=\'"+lang[\'ext_uninstall\']+"\' src=\'"+rlUrlHome+"img/blank.gif\' onclick=\'rlConfirm( \\""+lang[\'ext_plugin_uninstall\']+"\\", \\"xajax_unInstall\\", \\""+Array(value)+"\\" )\' />";
					}
					out += "</center>";
					
					return out;
				}
			}
		]
	});
	
	'; ?>
<?php echo rlHook::load(array('name' => 'apTplPluginsGrid'), $this);?>
<?php echo '
	
	pluginsGrid.init();
	grid.push(pluginsGrid.grid);
	
	pluginsGrid.grid.addListener(\'beforeedit\', function(editEvent)
	{
		if( editEvent.value == \'not_installed\' )
		{
			pluginsGrid.store.rejectChanges();
			Ext.MessageBox.alert(lang[\'ext_notice\'], lang[\'ext_need_install\']);
		}
	});
	
});
'; ?>

//]]>
</script>
<!-- plugins grid end -->

<?php echo rlHook::load(array('name' => 'apTplPluginsBottom'), $this);?>


<!-- plugins tpl end -->